﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>fadeToggle()方法</title>
    <script src="jquery.min.js">
    </script>
    <script>
        $(document).ready(function () {
            $("button").click(function () {
                $("#div1").fadeToggle();
                $("#div2").fadeToggle("slow");
                $("#div3").fadeToggle(3000);
            });
        });
    </script>
</head>
<body>
    <p> fadeToggle()使用了不同的speed(速度)参数</p>
    <button>单击淡入/淡出</button>
    <br><br>
    <div id="div1" style="width:80px;height:80px;background-color:red;"></div>
    <br>
    <div id="div2" style="width:80px;height:80px;background-color:green;"></div>
    <br>
    <div id="div3" style="width:80px;height:80px;background-color:blue;"></div>
</body>
</html>